<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<?
require_once '../classes/ConnectionDB.php';
require_once '../classes/UtenteDataManager.php';

$db = ConnectionDB::getInstance()->connectToDB();
$scuole = UtenteDataManager::getInstance()->getScuole($db);
?>
<html>
    <head>
        <script src="../glassboxLatest/glassbox.2.0.0/javascripts/prototype.js" type="text/javascript"></script>
        <script src="../glassboxLatest/glassbox.2.0.0/javascripts/scriptaculous/effects.js" type="text/javascript"></script>
        <script src="../glassboxLatest/glassbox.2.0.0/javascripts/glassbox/glassbox.js" type="text/javascript"></script>
        <style type="text/css">
          
             @import url("../css/style.css");

            #myBox_2 {

                padding-top: 15%;
                padding-left: 27%;

            }

            #myBox_2_contentBoxBg{
                background: url(../images/sfondoContainer.jpg ) top left repeat;
                filter: alpha(opacity=80);
                -moz-opacity:.80;
                opacity:2;
            }


            #myBox_2_content {
                padding: 10%;
                font-family: verdana, arial, helvetica;
                font-size: 14px;
                text-align: center;
            }

        </style>
        <script type="text/javascript">
            path_to_root_dir = "../glassboxLatest/glassbox.2.0.0/";

            window.onload = function(){

                var myBox_2 = new GlassBox();
                myBox_2.init( 'myBox_2', '540px', '290px', '','', true, false);
                myBox_2.ipos();
                myBox_2.appear();


            }
        </script>
    </head>

    <body>
        <div id="wrapper">

            <div id="myBox_2" >
                <div id="content">
                    <form method="POST" action="checkAndDoLogin.php">
                        <table>
                            <tr>
                                <td align="left">Scuola</td>
                                <td align="left">
                                    <select name="scuola">
                                        <?for($i=0;$i<count($scuole);$i++)
                                        {?>
                                        <option value="<?= $scuole[$i]->getCodice()?>"><?=$scuole[$i]->getNome()?></option>
                                        <?}?>
                                    </select>

                                </td>
                            </tr>
                            <tr>
                                <td align="left">Tipo utente: </td>
                                <td align="left">
                                    <select name="tipoUtente">
                                        <option value="docente">Docente</option>
                                        <option value="studente">Studente</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">Username : </td><td><input type="text" name="username" /></td>
                            </tr>
                            <tr>
                                <td align="left">Password : </td><td><input type="password" name="password"/></td>
                            </tr>

                            <tr>
                                <td>&nbsp;</td><td><input type="submit" value="Login"/></td>
                            </tr>

                        </table>
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>